home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Bus
/
H-L
/
Invoicer.cpt
/
Payments
< prev
next >
Wrap
Text File
|
1987-04-07
|
3KB
|
120 lines
CLS
CustCode:
CLS
TEXTSIZE (24):TEXTFACE(5)
PRINT:PRINT SPC(11);"PAYMENTS"
TEXTSIZE(12):TEXTFACE(0)
INPUT"Customer Code ('help' for code list):",CO$
IF CO$="help" OR CO$ = "h" THEN CLS: GOTO ListCodes
IF CO$="quit" OR CO$="q" THEN CLS:LOAD "Open Me First",R
IF LEN(CO$)<>2 THEN RUN
CustName:
OPEN "Customers B" FOR INPUT AS #1
CusName:
IF EOF(1) THEN CLOSE #1:CLS: PRINT:TEXTFACE(1):PRINT"This customer not on file…":FOR m = 1 TO 2500:NEXT:CLS:RUN
INPUT #1, CD$,CN$,ts$
IF CO$=CD$ THEN CLOSE #1:CLS:GOTO UpdateFile
GOTO CusName
UpdateFile:
OPEN CO$ FOR INPUT AS #1
INPUT #1,BF
CLOSE #1
Start:
CLS
TEXTSIZE (24):TEXTFACE(5)
PRINT:PRINT SPC(11);"PAYMENTS"
WINDOW 2,"",(25,100)-(476,280),3
TEXTSIZE (12):TEXTFACE (1)
PRINT"Customer:";
TEXTFACE (1)
PRINT TAB(16);
IF LEN (CN$) >40 THEN PRINT LEFT$(CN$,40);"…": GOTO Skpt
PRINT CN$
Skpt:
PRINT"Current balance: ";
TEXTFACE (1)
PRINT TAB (16);
PRINT USING"$####.##"; BF
LINE(0,54)-(485,54)
PRINT
TEXTSIZE(9)
PRINT
TEXTSIZE(12):TEXTFACE (1)
PRINT "Payment received: ";
TEXTFACE(1)
PRINT TAB(16);
PRINT"$ ";
INPUT"",PR
IF PR = 0 THEN RUN
LINE(0,110)-(485,110)
PRINT:PRINT
PR$=STR$(PR)
PRINT:PRINT"New balance: ";
TEXTFACE (1)
PRINT TAB(16);
PRINT USING "$###.##"; (BF-PR);
YourChoyce:
WINDOW 3,"",(25,285)-(476,330),-3
BUTTON 1,1,"OK",(55,10)-(160,35),1
BUTTON 2,1,"again",(299,10)-(404,35),1
WHILE DIALOG(0)<>1:WEND
ButtonPushed =DIALOG(1)
IF ButtonPushed=1 THEN Bal
IF ButtonPushed =2 THEN WINDOW CLOSE 2:WINDOW CLOSE 3:CLS:RUN
Bal:
OPEN CO$ FOR OUTPUT AS #1
PRINT #1,(BF-PR)
CLOSE #1
AcctsFile:
dr$=DATE$
OPEN "Accts Recd" FOR APPEND AS #1
PRINT #1,ts$
PRINT #1,CO$
PRINT #1,dr$
PRINT #1,CN$
PRINT #1,PR$
CLOSE #1
YourChoice:
WINDOW 3,"",(25,285)-(476,330),-3
BUTTON 1,1,"another",(55,10)-(160,35),1
BUTTON 2,1,"quit",(299,10)-(404,35),1
WHILE DIALOG(0)<>1:WEND
ButtonPushed =DIALOG(1)
IF ButtonPushed=1 THEN RUN
IF ButtonPushed =2 THEN WINDOW CLOSE 2:WINDOW CLOSE 3:CLS: LOAD "Open Me First",R
ListCodes:
CLS
Lst:
OPEN "Customers B" FOR INPUT AS #1
WINDOW 2,"",(25,50)-(476,280),3
OpFile:
TEXTFACE(1)
IF EOF(1) THEN CLOSE #1:TEXTFACE(0):GOTO NewWndw
INPUT #1,CD$,CN$,ts$
PRINT CD$;
PRINT" - ";CN$
GOTO OpFile
NewWndw:
WINDOW 3,"",(25,285)-(476,330),-3
BUTTON 1,1,"again",(55,10)-(130,35),1
BUTTON 2,1,"enter info",(192,10)-(267,35),1
BUTTON 3,1,"quit",(329,10)-(404,35),1
WHILE DIALOG(0)<>1:WEND
ButtonPushed = DIALOG(1)
IF ButtonPushed = 1 THEN Lst
IF ButtonPushed = 2 THEN WINDOW CLOSE 2:WINDOW CLOSE 3:RUN
IF ButtonPushed = 3 THEN LOAD "Open Me First",R